using System;
using System.Collections.Generic;
using System.Text;
using Graphics;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Graphics3D
{
    public class XNAShader : BaseShader
    {
        private Effect effect;
        public XNAShader(XNARenderer renderer,string shaderPath)
        {   
            effect = renderer.Content.Load<Effect>(shaderPath);
        }

        public Effect Effect
        {
            get { return this.effect; }
            set { this.effect = value; }
        }

        public override object GetParameters(string parameter, object value)
        {
            return base.GetParameters(parameter, value);
        }

        public override void SetParameters(string parameter, object value)
        {
            base.SetParameters(parameter, value);
            //effect.Parameters[parameter].SetValue(value);
        }
        public void SetParameters(string parameter, Vector4 value)
        {
            effect.Parameters[parameter].SetValue(value);
        }

        public void SetParameters(string parameter, TextureCube value)
        {
            effect.Parameters[parameter].SetValue(value);
        }

        public void SetParameters(string parameter, int value)
        {
            effect.Parameters[parameter].SetValue(value);
        }

        public void Load()
        {

        }
    }
}
